import json
import importlib

from pandas import DataFrame

import time

def timer(func):
    def wrapper(*args, **kwargs):
        start_time = time.time()
        result = func(*args, **kwargs)
        end_time = time.time()
        print(f"执行时长 {func.__name__} took {end_time - start_time:.6f} s.")
        return result
    return wrapper



class BasePlugin():
    def __init__(self):
        self.id= ""
        self.name= ""
        self.type=""
        self.param = {}
        self.nextSteps = []
        self.beforeSteps = []


    def run(self):
        pass

    def getNextSteps(self):
        pass

    def getResult(self)-> DataFrame:
        pass